home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / ptv2n1.arc / SYSCOM2.TXT < prev    next >
Text File  |  1991-03-26  |  935b  |  30 lines

  1. /* When minimized, all the windows in OpenWindows
  2.    will also be minimized. Restores all windows if its system
  3.    menu choice Restore All (0xF220) is selected          */
  4.  
  5. Def WM_SYSCOMMAND(self,wp,lp | choice)
  6. {
  7.   WM_SYSCOMMAND(self:ancestor,wp,lp);
  8.   /* The last four bits are used internally by */
  9.   /* MS-Windows, so mask them to get           */
  10.   /* the real value:                           */
  11.   choice := wp bitAnd 0xFFF0;
  12.  
  13.   select
  14.     /* the minimize box was clicked,
  15.        so iconize all windows in OpenWindows */
  16.     case choice = 0xF020
  17.        do(OpenWindows,{using(win) show(win,2)})
  18.     endCase
  19.  
  20.     /* Restore All is selected,
  21.        so restore all windows in OpenWindows */
  22.     case choice = 0xF220
  23.        /* need to restore the Actor */
  24.        /* Display explicitly here:  */
  25.        show(mainWindow(TheApp),1);
  26.        do(OpenWindows,{using(win) show(win,1)})
  27.     endCase
  28.   endSelect
  29. }
  30.